<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定时任务列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <!-- jquery 1.11 -->
    <script src="/lib/jquery.min.js"></script>
    <!-- layui -->
    <script src="/lib/layui/layui.js"></script>
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <!-- 业务js -->
    <script type="text/javascript" src="/schedule/list.js"></script>
</head>
<body>
<table class="layui-hide" id="quartzList" lay-filter="quartzFilter"></table>
<!-- 表头工具栏 -->
<script type="text/html" id="quartzHeaderBar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="addTask">添加任务</button>
        <button class="layui-btn layui-btn-sm" lay-event="pauseTask">暂停任务</button>
        <button class="layui-btn layui-btn-sm" lay-event="resumeTask">恢复任务</button>
        <button class="layui-btn layui-btn-sm" lay-event="deleteTask">删除任务</button>
    </div>
</script>

<!-- 表格工具栏 -->
<script type="text/html" id="quartzToolBar">
    {{#  if(d.triggerState == 'PAUSED'){ }}
    <a class="layui-btn layui-btn-xs" lay-event="resume">恢复</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    {{#  } }}
    {{#  if(d.triggerState == 'ACQUIRED'){ }}
    <a class="layui-btn layui-btn-xs" lay-event="pause">暂停</a>
    {{#  } }}
</script>

<!-- 表单数据 -->
<div id="quartzForm" style="display: none; padding:50px 50px 0px;">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: -30px;">
        <legend>新增任务</legend>
    </fieldset>
    <form class="layui-form layui-form-pane" action="" onsubmit="return false;">
        <div class="layui-form-item">
            <label class="layui-form-label">任务名称</label>
            <div class="layui-input-block">
                <input type="text" name="jobName" autocomplete="off" placeholder="请输入任务名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">任务所属组</label>
            <div class="layui-input-block">
                <input type="text" name="jobGroup" autocomplete="off" placeholder="请输入任务所属组" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">触发器名称</label>
            <div class="layui-input-block">
                <input type="text" name="triggerName" autocomplete="off" placeholder="请输入触发器名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">触发器所属组</label>
            <div class="layui-input-block">
                <input type="text" name="triggerGroup" autocomplete="off" placeholder="请输入触发器所属组" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">Cron表达式</label>
            <div class="layui-input-block">
                <input type="text" name="cronExpression" autocomplete="off" placeholder="请输入Cron表达式"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">开始时间</label>
            <div class="layui-input-block">
                <input type="text" name="startTime" id="startTime" autocomplete="off" placeholder="请选择开始时间"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">结束时间</label>
            <div class="layui-input-block">
                <input type="text" name="endTime" id="endTime" autocomplete="off" placeholder="请选择结束时间"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">任务类全路径名</label>
            <div class="layui-input-block">
                <input type="text" name="jobClassName" autocomplete="off" placeholder="请输入任务类全路径名" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">任务描述</label>
            <div class="layui-input-block">
                <textarea name="jobDescription" placeholder="请输入任务描述" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item" style="text-align: right;">
            <button class="layui-btn" lay-submit="" lay-filter="doSave">保存</button>
            <button class="layui-btn" onclick="doClose()">关闭</button>
        </div>
    </form>
</div>
</body>
</html>